package com.zhsm.fuxi.mvp.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.zhsm.fuxi.R
import com.zhsm.fuxi.utils.GlideUtils


/**
 * Created by GuZhC on 2018/11/7.
 * describe:
 */
class ReportInRecyclerAdapter(data: MutableList<Any?>?) : BaseQuickAdapter<Any, BaseViewHolder>(R.layout.layout_repot_in, data) {
    var size = data!!.size
    override fun convert(helper: BaseViewHolder?, data: Any?) {
        if (size - 1 == helper!!.adapterPosition) helper.setGone(R.id.iconPic, false)
        else helper.setGone(R.id.iconPic, true)
        if (!data.toString().isNullOrBlank())
            GlideUtils.loadImage(mContext, data, helper!!.getView(R.id.reportInPic))
    }
}